package dao;

import org.apache.ibatis.annotations.Param;
import pojo.Student;

import java.util.List;

public interface StudentDao {
    //增加
    int addStudent(Student student);
    //删除 根据id
    int deleteStudentById(int sid);
    //修改
    int updateStudent(Student student);
    //查询 根据id
    //全查询
    List<Student>findAll(@Param("offset") int offset,@Param("pageSize")int pageSize);
    List<Student> findAll2(@Param("student") Student student, @Param("offset") int offset, @Param("pageSize") int pageSize);
    //根据id
    Student findById(int sid);


    int count(Student student);

    List<Student> findStudentByName(String name);

    List<Student> findStudentByMajor(String major);

    List<Student> findStudentByGender(String gender);

    List<Student> findStudentByAge(Integer age);

    List<Student> findStudentByStatus(String status);

    List<Student> findStudentByNum(String studentNum);
}
